package com.vastcom.fabric.server;

import com.vastcom.fabric.server.tools.FileTools;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.hyperledger.fabric.sdk.HFClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

import java.security.Security;
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class Application {


    static{
        Security.addProvider(new BouncyCastleProvider());
    }

    @Bean
    public HFClient hfClient(){
        return HFClient.createNewInstance();
    }




    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }


}
